package com.weblog.model.article;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * category实体类
 * @author Administrator
 *
 */
@Entity
@Table(name="tb_category")
@Data
public class Category implements Serializable, TreeData<Category> {

	private static final long serialVersionUID=-4888776655562943999L;

	@Id
	private String id;//分类id
	private String cname;//分类名称
	private String parentId;//父级id
	private String isparent;//是否为父级
	private String state;//状态 0弃用 1使用
	private int clevel;//分类等级
    @Transient
    private List<Category> children;
}
